package com.ruoyi.accounting.domain;

import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 分类对象 acc_classification
 *
 * @author ruoyi
 * @date 2025-07-12
 */
@Data
public class AccClassification extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 账本id */
    @Excel(name = "账本id")
    private Long bookId;

    /** 分类种类 */
    @Excel(name = "分类种类")
    private Integer classificationType;

    /** 父分类id */
    @Excel(name = "父分类id")
    private Long parentId;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String classificationName;

    /** 图标链接 */
    @Excel(name = "图标链接")
    private String iconUrl;

    /** 是否删除 */
    private Integer delFlag;

    /**
     * 子分类
     */
    private List<AccClassification> subClassifications;



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("bookId", getBookId())
                .append("classificationType", getClassificationType())
                .append("parentId", getParentId())
                .append("classificationName", getClassificationName())
                .append("iconUrl", getIconUrl())
                .append("updateTime", getUpdateTime())
                .append("createTime", getCreateTime())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
